package com.woniuxy.sales.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.sales.common.RedisConst;
import com.woniuxy.sales.model.entity.China;
import com.woniuxy.sales.service.ChinaService;
import com.woniuxy.sales.mapper.ChinaMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
* @author Administrator
* @description 针对表【china(地区表)】的数据库操作Service实现
* @createDate 2024-11-01 09:59:52
*/
@Service
public class ChinaServiceImpl extends ServiceImpl<ChinaMapper, China> implements ChinaService{
    @Autowired
    private ChinaMapper chinaMapper;
    @Cacheable(cacheNames = RedisConst.CHINA_CACHE, key = "#id")
    @Override
    public China findById(Integer id) {
        return chinaMapper.selectById(id);
    }

}




